package com.tanhua.model.vo;

import com.tanhua.model.pojo.Admin;
import com.tanhua.model.pojo.Options;
import com.tanhua.model.pojo.QuestionNaire;
import com.tanhua.model.pojo.Questions;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class QuestionNaireVo implements Serializable {
    //问卷编号
    private String id;
    //问卷名称
    private String name;
    //封面
    private String cover;
    //级别
    private String level;
    //星级
    private String start;
    //试题
    private List<QuestionsVo> questions;
    //是否锁住
    private Integer isLock;
    //最新报告Id
    private String reportId;

    public static QuestionNaireVo init(QuestionNaire questionNaire,List<QuestionsVo> list) {
        QuestionNaireVo vo = new QuestionNaireVo();
        BeanUtils.copyProperties(questionNaire,vo);
        vo.setQuestions(list);
        return vo;
    }


}
